package com.zzc.emotisenseclassroom.dbservice.user;

import com.zzc.ZzcException.ParamNullException;
import com.zzc.emotisenseclassroom.domain.user.dto.GetStudentIdAndNameReqDTO;
import com.zzc.emotisenseclassroom.domain.user.vo.StudentIdAndNameVO;
import com.zzc.emotisenseclassroom.dto.user.StudentDTO;
import com.zzc.emotisenseclassroom.dto.user.UserDTO;
import com.zzc.emotisenseclassroom.pojo.UserLogin;
import com.zzc.emotisenseclassroom.pojo.UserRegister;

import java.util.List;
import java.util.Map;

/**
 * Copyright Zzc
 * FileName: UserDbService
 * Author:   Zzc
 * Date:     2024/4/1815:16
 * Description:用户数据库业务层
 * hISTORY:
 * <author>  <time>     <version>    <desc>
 * 作者姓名   修改时间       版本号       描述
 * Zzc                   1.0.0
 */
public interface UserDbService{
    UserDTO getUserInfo(UserLogin userLogin);

    Long checkAccountNumberIsExists(Long accountNumber);

    void userRegister(UserRegister userRegister);

    int updateUserInfo(UserDTO userDTO);

    /**
     * 通过学校id+班级id+工号/学号获取用户信息
     * @return
     */
    UserDTO getUserInfoByUserId(Long schoolId, Long classId, Long userId);

    List<StudentDTO> getStudentListBySchoolAndClass(Long schoolId, Long classId, Integer pageNum, Integer pageSize);

    List<StudentDTO> getStudentListByCondition(Map<String, Object> param);

    /**
     * 统计班级学生数
     * @param schoolId 学校id
     * @param classId 班级id
     * @return 该班级学生数
     */
    int countStudent(Long schoolId, Long classId);

    List<StudentIdAndNameVO> getStudentIdAndNameList(GetStudentIdAndNameReqDTO reqDTO);

    int conditionCountStudent(Map<String, String> requestData);
}
